<!--
 * @Description: 呼吸灯
 * @Author: rendc
 * @Date: 2021-08-17 14:08:48
 * @LastEditors: rendc
 * @LastEditTime: 2021-08-31 14:11:48
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>呼吸灯</title>
  <!-- 在html中添加js代码 声明和调用函数、传参、输出拼接字符串 -->
  <script type="text/javascript">
    this.name('larry');

    function name(params) {
      console.log("hello," + params + "*");
    }
  </script>
  <style>
    body {
      margin: 0;
      padding: 0;
    }

    div {
      box-sizing: border-box;
    }

    .content {
      width: 400px;
      height: 600px;
      /* background-color: antiquewhite; */
      margin: 0 auto;
    }

    .content>.box {
      /* border: 1px solid tomato; */
      height: 400px;
      padding: 40px;
      /* 指定应用的一系列动画 属性值是一个由@ keyframes 定义的动画序列*/
      animation-name: outer;
      /* 指定一个动画周期的时长 单位支持s ms 无单位值无效 */
      animation-duration: 5s;
      /* 定义CSS动画在每一动画周期中执行的节奏。 */
      animation-timing-function: linear;
      /* 定义动画在结束前运行的次数 infinite代表无限循环  number默认是1 可以用小数 */
      animation-iteration-count: infinite;
    }

    .content>.box>.outer {
      border: 5px solid gold;
      height: 100%;
      padding: 20px;
      animation-name: inner;
      animation-duration: 5s;
      animation-timing-function: linear;
      animation-iteration-count: infinite;
    }

    .content>.box>.outer>.inner {
      border: 5px solid yellowgreen;
      height: 100%;
    }

    .content>.box>.circle,
    .content>.box>.outer>.circle {
      border-radius: 50%;
    }

    @keyframes outer {
      25% {
        padding: 30px;
      }

      50% {
        padding: 40px;
      }
    }

    @keyframes inner {
      25% {
        padding: 30px;
      }

      50% {
        padding: 20px;
      }

      75% {
        padding: 30px;
      }

      100% {
        padding: 20px;
      }
    }
  </style>
</head>

<body>
  <div class="content">
    <!-- 方形外框 -->
    <div class="box">
      <!-- 外边的圆圈 -->
      <div class="outer circle">
        <!-- 内部的圆圈 -->
        <div class="inner circle">
        </div>
      </div>
    </div>
  </div>
</body>

</html>